Search results

Types

Classes
Interfaces
Enums
Functions
Type aliases
Constants

Members

Properties
Methods
Getters
Setters
Enum members
Show privates

Other

In this module only

Class ApplicationCommandsSchema

Defined in ApplicationCommandsSchema.ts

Constructor

constructor(options: CommandDatainterface CommandDatautils/CommandData[])

Creates a new ApplicationCommandSchema.

· options - ApplicationCommandSchema options

Example

const { ApplicationCommandSchema } = require() const commandsSchema = new ApplicationCommandSchema([ { name: 'play', implemented: true, description: 'Some description', options: { name: 'query', description: 'The song title you want to play' } } ]);

Properties

readonly commands: CommandDatainterface CommandDatautils/CommandData[][src]

Methods

extract(): DJSApplicationCommandsSchemainterface DJSApplicationCommandsSchemautils/DJSApplicationCommandsSchema[] | [][src]

Extracts slash commands formatted for DJS.

Returns

undefined

Example

await rest.put(Routes.applicationGuildCommands('clientID', 'guildID'), { body: commandsSchema.extract() });

private _isBetween(n: number | any, min: number, max: number): boolean[src]

Checks if a value is within a range of numbers.

· n - The number to check
· min - The min number
· max - The max number

Returns

undefined